@portabletext/markdown 1.5.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -9
- package/dist/index.d.ts +87 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1116 -280
- package/dist/index.js.map +1 -1
- package/package.json +10 -12
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ const markdown = portableTextToMarkdown([
|
|
|
70
70
|
| Blockquotes | ✅ | ✅ |
|
|
71
71
|
| Ordered lists | ✅ | ✅ |
|
|
72
72
|
| Unordered lists | ✅ | ✅ |
|
|
73
|
-
| Task lists |
|
|
73
|
+
| Task lists | ✅ | ✅ |
|
|
74
74
|
| Nested lists | ✅ | ✅ |
|
|
75
75
|
| Code blocks | ✅ | ✅ |
|
|
76
76
|
| Horizontal rules | ✅ | ✅ |
|
|
@@ -79,10 +79,31 @@ const markdown = portableTextToMarkdown([
|
|
|
79
79
|
| HTML blocks | ✅ | ✅ |
|
|
80
80
|
| Callouts | ✅ | ✅ |
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
## Round-trip behavior
|
|
83
|
+
|
|
84
|
+
Converting Markdown to Portable Text and back isn't a lossless mirror:
|
|
85
|
+
|
|
86
|
+
1. Translation preserves semantics, not source spelling: the first MD→PT→MD pass normalizes Markdown to one canonical spelling (autolinks become inline links, indented code becomes fenced code, soft-wrapped lines join into one, and so on).
|
|
87
|
+
2. The normalized Markdown is a fixpoint for plain text and the [Supported features](#supported-features) table: parsing it and serializing again reproduces it byte-for-byte.
|
|
88
|
+
3. MD→PT survival is schema-driven: a construct whose type the schema doesn't declare keeps its content and drops the structure that named it.
|
|
89
|
+
4. PT structures with no Markdown form degrade predictably on PT→MD (extra table header rows flatten into the body, deep or level-skipping lists collapse to relative nesting, unknown marks pass their text through unformatted). Unknown object types round-trip instead: block-level as a ` ```json:object ` fence, inline as a `json:object`-tagged code span, both carrying the value as JSON. A fence or span whose body isn't a JSON object with a `_type` is ordinary code.
|
|
90
|
+
5. Identity does not round-trip for text blocks: keys are regenerated on every parse, and adjacent spans with identical marks merge into one. Unknown objects keep their `_key`.
|
|
91
|
+
6. A hard break and a `\n` in a span's text are exclusive counterparts in both directions: a `\n` always renders as hard-break syntax on the way out, and hard-break syntax always becomes `\n` on the way in, never the space a soft wrap joins with.
|
|
92
|
+
|
|
93
|
+
The named exceptions to the fixpoint claim: an explicit-scheme URL or email keeps its text but gains a `link` mark on reparse, and a fuzzy `www.` form does too unless it carries markdown-significant punctuation; a hard break inside a heading splits into a second block on reparse, since an ATX heading is single-line; leading or trailing whitespace that CommonMark's own block parsing trims isn't part of the fixpoint; a `code` object with the reserved language `json:object` loses that language on serialization; and span text ending in `json:object` directly before a code-marked span holding a typed JSON object binds into an inline object on reparse.
|
|
94
|
+
|
|
95
|
+
See [Markdown round-tripping](https://www.portabletext.org/conversion/markdown-round-tripping/) on the docs site for the full contract and worked examples.
|
|
83
96
|
|
|
84
97
|
## Usage
|
|
85
98
|
|
|
99
|
+
<!-- The schema table, matcher table, and supported-features table have
|
|
100
|
+
condensed twins on the docs site
|
|
101
|
+
(apps/docs/src/content/docs/conversion/markdown-to-portable-text.mdx).
|
|
102
|
+
Keep them in sync: a claim corrected in one place is stale in the
|
|
103
|
+
other. The Round-trip behavior section above is a summary of
|
|
104
|
+
apps/docs/src/content/docs/conversion/markdown-round-tripping.mdx,
|
|
105
|
+
which is canonical; keep the two in sync the same way. -->
|
|
106
|
+
|
|
86
107
|
### `markdownToPortableText`
|
|
87
108
|
|
|
88
109
|
```ts
|
|
@@ -165,7 +186,7 @@ The default schema includes the following definitions:
|
|
|
165
186
|
| Type | Values |
|
|
166
187
|
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
167
188
|
| `styles` | `'normal'`, `'h1'`, `'h2'`, `'h3'`, `'h4'`, `'h5'`, `'h6'`, `'blockquote'` |
|
|
168
|
-
| `lists` | `'number'`, `'bullet'`
|
|
189
|
+
| `lists` | `'number'`, `'bullet'`, `'task'` |
|
|
169
190
|
| `decorators` | `'strong'`, `'em'`, `'code'`, `'strike-through'` |
|
|
170
191
|
| `annotations` | `'link'` (fields: `'href'`, `'title'`) |
|
|
171
192
|
| `blockObjects` | `'code'` (fields: `'language'`, `'code'`), `'image'` (fields: `'src'`, `'alt'`, `'title'`), `'horizontal-rule'`, `'html'` (fields: `'html'`), `'table'` (the canonical nested shape, see [Default behavior](#default-behavior)), `'callout'` (fields: `'tone'`, `'content'`) |
|
|
@@ -245,6 +266,8 @@ The default code block matcher requires the schema type to have a `'code'` field
|
|
|
245
266
|
|
|
246
267
|
**Links** support optional titles using `[text](url "title")` syntax. The title is captured in the `'title'` field of the `'link'` annotation.
|
|
247
268
|
|
|
269
|
+
**Line breaks**: soft-wrapped lines within a paragraph join with a single space; a hard break (two or more trailing spaces, or a backslash, before the newline) becomes a line break within the block.
|
|
270
|
+
|
|
248
271
|
**Nested lists** are handled automatically. Each list item block includes a `level` property indicating its nesting depth (1 for top-level, 2 for nested, etc.).
|
|
249
272
|
|
|
250
273
|
**HTML blocks** (like `<div>...</div>`) become `'html'` block objects with the raw HTML in the `'html'` field. Inline HTML is controlled by the `html.inline` option.
|
|
@@ -274,7 +297,7 @@ markdownToPortableText(markdown, {
|
|
|
274
297
|
})
|
|
275
298
|
```
|
|
276
299
|
|
|
277
|
-
> **Note:** Checking if the type exists in the schema isn't required, but it's good practice. Returning `undefined`
|
|
300
|
+
> **Note:** Checking if the type exists in the schema isn't required, but it's good practice. Returning `undefined` skips unsupported types.
|
|
278
301
|
|
|
279
302
|
**Table matcher:** GFM pipe tables convert by default (see [Default behavior](#default-behavior)). Provide your own matcher to map onto a differently-shaped `table` type:
|
|
280
303
|
|
|
@@ -318,7 +341,7 @@ The matcher receives `value.items` already assembled. Each item's `content` arra
|
|
|
318
341
|
|
|
319
342
|
Without `types.list`, the existing flat-block path runs unchanged.
|
|
320
343
|
|
|
321
|
-
**GFM task lists** (`- [ ]` / `- [x]`): Task lists are recognized when the schema declares a `task` list item. Without a `task` definition, the checkbox markers are stripped from the text and the items render as their surrounding list type (bullet or number). With a `task` definition, items carrying a checkbox become text blocks with `listItem: 'task'` and a `checked: boolean` field; items without a checkbox keep their surrounding list type.
|
|
344
|
+
**GFM task lists** (`- [ ]` / `- [x]`): Task lists are recognized when the schema declares a `task` list item; the default schema does, so task lists parse zero-config. Without a `task` definition (a custom schema that omits it), the checkbox markers are stripped from the text and the items render as their surrounding list type (bullet or number). With a `task` definition, items carrying a checkbox become text blocks with `listItem: 'task'` and a `checked: boolean` field; items without a checkbox keep their surrounding list type.
|
|
322
345
|
|
|
323
346
|
```ts
|
|
324
347
|
markdownToPortableText('- [x] done\n- [ ] todo', {
|
|
@@ -392,6 +415,39 @@ markdownToPortableText(markdown, {
|
|
|
392
415
|
})
|
|
393
416
|
```
|
|
394
417
|
|
|
418
|
+
#### Reporting degradation
|
|
419
|
+
|
|
420
|
+
Every construct the schema can't represent (a decorator not in the schema, a table with no `table` block object, a task checkbox with no `task` list, and so on) degrades to a lossier shape rather than throwing. A ` ```json:object ` fence or tagged code span that fails to reconstruct (invalid JSON, or no string `_type`) reports too, as `object-carrier-invalid`, even on a schema that would otherwise accept everything: it's the payload that's unusable, not the schema. `onDegradation` observes both, one callback covering all uses. Left unset, the conversion stays silent and returns the lossiest representation it can build, since a library shouldn't log on its own initiative. Passed a function, observe the losses: it's called once, after the whole document has been walked, only when at least one construct degraded, with a report object holding every `Degradation` in encounter order and a canonical grouped `message`. Enforce against lossy output by throwing your own error from inside that callback; the throw propagates out of `markdownToPortableText`.
|
|
421
|
+
|
|
422
|
+
```ts
|
|
423
|
+
markdownToPortableText(markdown, {
|
|
424
|
+
onDegradation: ({degradations, message}) => {
|
|
425
|
+
// degradations: every Degradation, in encounter order
|
|
426
|
+
// message: the same degradations grouped, snippeted, and sorted by line
|
|
427
|
+
logger.warn(message)
|
|
428
|
+
},
|
|
429
|
+
})
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Each `Degradation` carries `type`, a human-readable `message`, `line` when a source line is available, and `snippet` (the offending construct's text, truncated to 40 characters) when there's a specific piece of source text to quote. Match on `type`, not `message`: the type is the stable contract, the message can change between releases.
|
|
433
|
+
|
|
434
|
+
Enforcing means throwing your own error from inside the callback:
|
|
435
|
+
|
|
436
|
+
```ts
|
|
437
|
+
markdownToPortableText('# heading\n\n**bold**', {
|
|
438
|
+
schema: compileSchema(defineSchema({})),
|
|
439
|
+
onDegradation: ({message}) => {
|
|
440
|
+
throw new Error(message)
|
|
441
|
+
},
|
|
442
|
+
})
|
|
443
|
+
// throws Error:
|
|
444
|
+
// Markdown could not be converted without loss:
|
|
445
|
+
// - line 1: `#` heading became a normal paragraph: the schema has no `h1` style ("heading")
|
|
446
|
+
// - line 3: Removed bold formatting, kept the text: the schema has no `strong` decorator ("bold")
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Repeated declines of the same kind (the same missing decorator on three spans, say) collapse into one line of `message` instead of repeating the sentence: `- Removed bold formatting, kept the text: the schema has no \`strong\` decorator (3×: "a", "b", "c")`. `degradations` stays ungrouped, one entry per occurrence.
|
|
450
|
+
|
|
395
451
|
### `portableTextToMarkdown`
|
|
396
452
|
|
|
397
453
|
```ts
|
|
@@ -543,17 +599,19 @@ portableTextToMarkdown(blocks, {
|
|
|
543
599
|
|
|
544
600
|
#### What renderers receive
|
|
545
601
|
|
|
602
|
+
One question decides which text field a renderer reads: **are you wrapping markdown, or emitting something else?** `children` is markdown: nested marks are rendered and literal punctuation is backslash-escaped, so it embeds in markdown output as-is (`` `**${children}**` ``). `text` is source: the raw span text exactly as stored, for renderers that emit their own delimiters or non-markdown output (code fences, HTML tags), where escapes would appear literally. The built-in `code` decorator renderer reads `text`; every other built-in reads `children`.
|
|
603
|
+
|
|
546
604
|
**Block renderers** (`block.*`):
|
|
547
605
|
|
|
548
606
|
- `value` – the block object
|
|
549
|
-
- `children` – rendered content of the block
|
|
607
|
+
- `children` – rendered content of the block, as markdown (escaped)
|
|
550
608
|
- `index` – position in the blocks array
|
|
551
609
|
|
|
552
610
|
**Mark renderers** (`marks.*`):
|
|
553
611
|
|
|
554
612
|
- `value` – the mark definition (for annotations like links)
|
|
555
|
-
- `children` – the rendered marked content
|
|
556
|
-
- `text` – the raw text content (
|
|
613
|
+
- `children` – the rendered marked content, as markdown (escaped)
|
|
614
|
+
- `text` – the raw text content (unescaped, no nested mark rendering)
|
|
557
615
|
- `markType` – the mark type name
|
|
558
616
|
- `markKey` – the mark's key (for annotations)
|
|
559
617
|
|
|
@@ -608,7 +666,7 @@ portableTextToMarkdown(blocks, {
|
|
|
608
666
|
})
|
|
609
667
|
```
|
|
610
668
|
|
|
611
|
-
By default, unknown types render as
|
|
669
|
+
By default, unknown types render as `json:object` fences or tagged code spans that round-trip (see [Round-trip behavior](#round-trip-behavior)), and unknown marks/styles pass through their children unchanged.
|
|
612
670
|
|
|
613
671
|
You can also customize hard break rendering:
|
|
614
672
|
|
package/dist/index.d.ts
CHANGED
|
@@ -282,7 +282,9 @@ interface PortableTextRendererOptions<T> {
|
|
|
282
282
|
*/
|
|
283
283
|
isInline: boolean;
|
|
284
284
|
/**
|
|
285
|
-
* Serialized Markdown of child nodes of this block/type
|
|
285
|
+
* Serialized Markdown of child nodes of this block/type: nested marks
|
|
286
|
+
* rendered, markdown-significant punctuation in plain text
|
|
287
|
+
* backslash-escaped. Safe to embed in markdown output as-is.
|
|
286
288
|
*/
|
|
287
289
|
children?: string;
|
|
288
290
|
/**
|
|
@@ -309,7 +311,12 @@ interface PortableTextMarkRendererOptions<M extends TypedObject = ArbitraryTyped
|
|
|
309
311
|
*/
|
|
310
312
|
value?: M;
|
|
311
313
|
/**
|
|
312
|
-
*
|
|
314
|
+
* The raw text content of this mark: the span text exactly as stored in
|
|
315
|
+
* the Portable Text, unescaped, with no nested mark rendering. Read this
|
|
316
|
+
* when your renderer emits its own delimiters or non-markdown output
|
|
317
|
+
* (code fences, HTML tags), where backslash escapes would appear
|
|
318
|
+
* literally. The built-in `code` decorator renderer works from this
|
|
319
|
+
* field.
|
|
313
320
|
*/
|
|
314
321
|
text: string;
|
|
315
322
|
/**
|
|
@@ -321,7 +328,11 @@ interface PortableTextMarkRendererOptions<M extends TypedObject = ArbitraryTyped
|
|
|
321
328
|
*/
|
|
322
329
|
markType: string;
|
|
323
330
|
/**
|
|
324
|
-
* Serialized Markdown of child nodes
|
|
331
|
+
* Serialized Markdown of this mark's child nodes: nested marks are
|
|
332
|
+
* rendered and markdown-significant punctuation in plain text is
|
|
333
|
+
* backslash-escaped. Safe to embed in markdown output as-is; wrapping
|
|
334
|
+
* renderers (`**${children}**`) should always use this. For the raw,
|
|
335
|
+
* unescaped text, read `text` instead.
|
|
325
336
|
*/
|
|
326
337
|
children: string;
|
|
327
338
|
/**
|
|
@@ -403,6 +414,20 @@ declare const DefaultEmRenderer: PortableTextMarkRenderer;
|
|
|
403
414
|
*/
|
|
404
415
|
declare const DefaultStrongRenderer: PortableTextMarkRenderer;
|
|
405
416
|
/**
|
|
417
|
+
* Renders a `code` decorator from the raw span text, bypassing the escaped
|
|
418
|
+
* `children`: code content is verbatim, never markdown syntax. The
|
|
419
|
+
* backtick fence is widened past the longest run of backticks already in
|
|
420
|
+
* the text (CommonMark: the fence must be longer than any run it encloses).
|
|
421
|
+
*
|
|
422
|
+
* A space is padded on each side when the content starts or ends with a
|
|
423
|
+
* backtick, so the fence and the content's own backtick never merge into
|
|
424
|
+
* one run, and also when the content starts and ends with a space and
|
|
425
|
+
* isn't all whitespace (`text.trim() !== ''`; an all-space code span has
|
|
426
|
+
* nothing else for CommonMark's strip rule to leave behind, so padding it
|
|
427
|
+
* would only add visible spaces), because CommonMark itself would
|
|
428
|
+
* otherwise strip one such space per side on reparse; the padding
|
|
429
|
+
* pre-compensates for that strip.
|
|
430
|
+
*
|
|
406
431
|
* @public
|
|
407
432
|
*/
|
|
408
433
|
declare const DefaultCodeRenderer: PortableTextMarkRenderer;
|
|
@@ -579,9 +604,67 @@ type ObjectMatcher<TValue extends Record<string, unknown> = Record<string, never
|
|
|
579
604
|
value: TValue;
|
|
580
605
|
isInline: boolean;
|
|
581
606
|
}) => PortableTextObject | undefined;
|
|
607
|
+
/**
|
|
608
|
+
* The classification of a lossy conversion encountered while converting
|
|
609
|
+
* markdown to Portable Text: a markdown construct the conversion couldn't
|
|
610
|
+
* carry through losslessly, whether because the target schema (or the
|
|
611
|
+
* active matchers) doesn't represent it, or because the surrounding
|
|
612
|
+
* structure (a table cell, for instance) can't hold the shape markdown
|
|
613
|
+
* expressed, so the conversion fell back to a lossier representation
|
|
614
|
+
* instead of failing.
|
|
615
|
+
*
|
|
616
|
+
* @public
|
|
617
|
+
*/
|
|
618
|
+
type DegradationType = 'decorator-dropped' | 'annotation-dropped' | 'style-fallback' | 'list-flattened' | 'task-checkbox-stripped' | 'table-flattened' | 'code-block-to-text' | 'horizontal-rule-to-text' | 'html-block-to-text' | 'inline-html-dropped' | 'image-block-to-inline' | 'image-inline-to-block' | 'image-to-text' | 'callout-fallback' | 'fields-dropped' | 'object-carrier-invalid';
|
|
619
|
+
/**
|
|
620
|
+
* Reports a single lossy conversion, in encounter order: as the conversion
|
|
621
|
+
* walks the markdown, that's the order nested constructs close in, not
|
|
622
|
+
* necessarily top-to-bottom document order. `line` is the 1-based markdown
|
|
623
|
+
* source line: usually the line of the token that degraded, but for a
|
|
624
|
+
* token without its own line (an inline construct inside a table cell, for
|
|
625
|
+
* instance) the enclosing construct's line instead; absent when no token
|
|
626
|
+
* carries a usable line at all. `snippet` is the offending construct's
|
|
627
|
+
* text, truncated to 40 characters with an ellipsis, present whenever the
|
|
628
|
+
* degradation has a specific piece of source text to quote (a dropped
|
|
629
|
+
* decorator's span, an unsupported image's alt text) and absent when the
|
|
630
|
+
* construct has nothing to quote (a table with no `table` block object, a
|
|
631
|
+
* callout whose type isn't in the schema). `message` is human-readable and
|
|
632
|
+
* may change between releases; match on `type`, not `message`. The set of
|
|
633
|
+
* `type` values grows in minor releases as new degradation sites report, so
|
|
634
|
+
* compare against the values you handle rather than switching exhaustively.
|
|
635
|
+
*
|
|
636
|
+
* @public
|
|
637
|
+
*/
|
|
638
|
+
type Degradation = {
|
|
639
|
+
type: DegradationType;
|
|
640
|
+
message: string;
|
|
641
|
+
line?: number;
|
|
642
|
+
snippet?: string;
|
|
643
|
+
};
|
|
582
644
|
type Options = {
|
|
583
645
|
schema?: Schema;
|
|
584
646
|
keyGenerator?: () => string;
|
|
647
|
+
/**
|
|
648
|
+
* Called at most once, after the conversion has walked the whole
|
|
649
|
+
* document, only when at least one construct degraded. Left unset, the
|
|
650
|
+
* conversion stays silent and returns the lossiest representation it can
|
|
651
|
+
* build. Passed a function, observe every degradation via
|
|
652
|
+
* `report.degradations`, in encounter order. Enforce against lossy output by
|
|
653
|
+
* throwing your own error from inside the callback, using
|
|
654
|
+
* `report.message` (the canonical grouped text) as its message; the
|
|
655
|
+
* throw propagates out of `markdownToPortableText`.
|
|
656
|
+
*
|
|
657
|
+
* ```ts
|
|
658
|
+
* markdownToPortableText(markdown, {onDegradation: ({message}) => { throw new Error(message) }})
|
|
659
|
+
* ```
|
|
660
|
+
*
|
|
661
|
+
* `report` is a single object, not positional parameters, so it can gain
|
|
662
|
+
* fields later without a breaking change.
|
|
663
|
+
*/
|
|
664
|
+
onDegradation?: (report: {
|
|
665
|
+
degradations: Array<Degradation>;
|
|
666
|
+
message: string;
|
|
667
|
+
}) => void;
|
|
585
668
|
marks?: {
|
|
586
669
|
strong?: DecoratorMatcher;
|
|
587
670
|
em?: DecoratorMatcher;
|
|
@@ -668,5 +751,5 @@ type Options = {
|
|
|
668
751
|
* @public
|
|
669
752
|
*/
|
|
670
753
|
declare function markdownToPortableText(markdown: string, options?: Options): Array<PortableTextBlock>;
|
|
671
|
-
export { type AnnotationMatcher, type BlockSpacingRenderer, type DecoratorMatcher, DefaultBlockSpacingRenderer, DefaultBlockquoteObjectRenderer, DefaultBlockquoteRenderer, DefaultCalloutRenderer, DefaultCodeBlockRenderer, DefaultCodeRenderer, DefaultEmRenderer, DefaultH1Renderer, DefaultH2Renderer, DefaultH3Renderer, DefaultH4Renderer, DefaultH5Renderer, DefaultH6Renderer, DefaultHardBreakRenderer, DefaultHorizontalRuleRenderer, DefaultHtmlRenderer, DefaultImageRenderer, DefaultLinkRenderer, DefaultListItemRenderer, DefaultListRenderer, DefaultNormalRenderer, DefaultStrikeThroughRenderer, DefaultStrongRenderer, DefaultTableRenderer, DefaultUnderlineRenderer, type ListItemMatcher, type ObjectMatcher, type PortableTextBlockRenderer, type PortableTextListItemRenderer, type PortableTextMarkRenderer, type PortableTextMarkRendererOptions, type PortableTextRenderer, type PortableTextRendererOptions, type PortableTextRenderers, type PortableTextTypeRenderer, type PortableTextTypeRendererOptions, type StyleMatcher, markdownToPortableText, portableTextToMarkdown };
|
|
754
|
+
export { type AnnotationMatcher, type BlockSpacingRenderer, type DecoratorMatcher, DefaultBlockSpacingRenderer, DefaultBlockquoteObjectRenderer, DefaultBlockquoteRenderer, DefaultCalloutRenderer, DefaultCodeBlockRenderer, DefaultCodeRenderer, DefaultEmRenderer, DefaultH1Renderer, DefaultH2Renderer, DefaultH3Renderer, DefaultH4Renderer, DefaultH5Renderer, DefaultH6Renderer, DefaultHardBreakRenderer, DefaultHorizontalRuleRenderer, DefaultHtmlRenderer, DefaultImageRenderer, DefaultLinkRenderer, DefaultListItemRenderer, DefaultListRenderer, DefaultNormalRenderer, DefaultStrikeThroughRenderer, DefaultStrongRenderer, DefaultTableRenderer, DefaultUnderlineRenderer, type Degradation, type ListItemMatcher, type ObjectMatcher, type PortableTextBlockRenderer, type PortableTextListItemRenderer, type PortableTextMarkRenderer, type PortableTextMarkRendererOptions, type PortableTextRenderer, type PortableTextRendererOptions, type PortableTextRenderers, type PortableTextTypeRenderer, type PortableTextTypeRendererOptions, type StyleMatcher, markdownToPortableText, portableTextToMarkdown };
|
|
672
755
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../node_modules/.pnpm/@portabletext+types@4.0.2/node_modules/@portabletext/types/dist/index.d.ts","../src/from-portable-text/renderers/block-spacing.ts","../src/from-portable-text/types.ts","../src/from-portable-text/portable-text-to-markdown.ts","../src/from-portable-text/renderers/hard-break.ts","../src/from-portable-text/renderers/list-item.ts","../src/from-portable-text/renderers/style.ts","../src/from-portable-text/renderers/marks.ts","../src/from-portable-text/renderers/type.ts","../src/to-portable-text/matchers.ts","../src/to-portable-text/markdown-to-portable-text.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;UAKU;;;;;EAKR;;;;;EAKA;;;;;;KAMG,uBAAuB;GACzB;;;;;;;;;;;;;UAaO,oBAAkB,UAAU,6BAA6B,4BAA4B,UAAU,cAAc,uBAAuB,kBAAkB,mBAAmB,wBAAwB,mBAAmB,kCAAkC;;;;;;;EAO9P;;;;;;EAMA;;;;;EAKA,UAAU;;;;;;EAMV,WAAW;;;;;EAKX,QAAQ;;;;;EAKR,WAAW;;;;EAIX;;;;;;;;;;;UAWQ,0BAA0B,UAAU,6BAA6B,4BAA4B,UAAU,cAAc,kBAAkB,mBAAmB,wBAAwB,mBAAmB,kCAAkC,KAAK,oBAAkB,GAAG,GAAG,GAAG;EAC/Q,UAAU;;;;;;KAMP;;;;;KAKA;;;;;;;UAOK;;;;GAIP;;;;;EAKD;;;;EAIA;;;;;;UAMQ;;;;EAIR;;;;EAIA;;;;EAIA;;;;;;EAMA;;;;;KCnIU,wBAAwB;EAClC,SAAS;EACT,MAAM;;;;;cAMK,6BAA6B;KCRrC,YAAY,kBAAkB,KAAK,eAAe,QACpD,KAAK,KAAK;;;;;;KAQD,qBAAqB,MAC/B,SAAS,4BAA4B;;;;;;KAQ3B,4BAA4B,qBAAqB;;;;;;KAOjD,+BACV,qBAAqB;;;;;;KAOX,yBAAyB,UAAU,sBAC7C,SAAS,gCAAgC;;;;KAM/B,yBAAyB,UAAU,sBAC7C,SAAS,gCAAgC;;;;;;;UAS1B;;;;;;;;;;;EAWf,OAAO,eAAe;;;;;;;EAQtB,OAAO,eAAe;;;;;;;;;EAUtB,OACI,YAAY,wBAAwB,yCACpC;;;;;;;;;EAUJ,UACI,YACE,0BACA,4CAEF;;;;;EAMJ;;;;;EAMA,aAAa;;;;;EAMb,aAAa,qBAAqB;;;;;EAMlC,mBAAmB,qBAAqB;;;;;EAMxC,iBAAiB,qBAAqB;;;;;;;UAQvB,4BAA4B;;;;EAI3C,OAAO;;;;EAKP;;;;EAKA;;;;;;;;EASA;;;;;EAMA
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../node_modules/.pnpm/@portabletext+types@4.0.2/node_modules/@portabletext/types/dist/index.d.ts","../src/from-portable-text/renderers/block-spacing.ts","../src/from-portable-text/types.ts","../src/from-portable-text/portable-text-to-markdown.ts","../src/from-portable-text/renderers/hard-break.ts","../src/from-portable-text/renderers/list-item.ts","../src/from-portable-text/renderers/style.ts","../src/from-portable-text/renderers/marks.ts","../src/from-portable-text/renderers/type.ts","../src/to-portable-text/matchers.ts","../src/to-portable-text/markdown-to-portable-text.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;UAKU;;;;;EAKR;;;;;EAKA;;;;;;KAMG,uBAAuB;GACzB;;;;;;;;;;;;;UAaO,oBAAkB,UAAU,6BAA6B,4BAA4B,UAAU,cAAc,uBAAuB,kBAAkB,mBAAmB,wBAAwB,mBAAmB,kCAAkC;;;;;;;EAO9P;;;;;;EAMA;;;;;EAKA,UAAU;;;;;;EAMV,WAAW;;;;;EAKX,QAAQ;;;;;EAKR,WAAW;;;;EAIX;;;;;;;;;;;UAWQ,0BAA0B,UAAU,6BAA6B,4BAA4B,UAAU,cAAc,kBAAkB,mBAAmB,wBAAwB,mBAAmB,kCAAkC,KAAK,oBAAkB,GAAG,GAAG,GAAG;EAC/Q,UAAU;;;;;;KAMP;;;;;KAKA;;;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